package com.itbaizhan.dao;

import com.itbaizhan.domain.Student;
/*使用Spring实现IOC*/
public class StudentDaoImpl2 implements StudentDao{
     /*测试单例对象*/
  /*  public StudentDaoImpl2(){
        System.out.println("创建了studentDao");
    }
    *//*测义对象的生命周其期 在bean。xml中bean标签 中有 *//*
    public void init(){
        System.out.println("创建对象。。。");
    }
    public void destroy(){
        System.out.println("销毁对象");
    }*/
    @Override
    public Student findById(int id) {
        System.out.println("新方法");
        return new Student(1,"程序","北京");
    }
}
